from aiogram_dialog import DialogManager

from src.bot.states.user import CalendarDetailsSG


async def select_category_id(_, __, manager: DialogManager, category_id: str):
    manager.dialog_data["category_id"] = int(category_id)
    await manager.next()


async def select_calendar(_, __, manager: DialogManager, user_calendar_id: str):
    await manager.start(
        CalendarDetailsSG.calendar_details, {"user_calendar_id": user_calendar_id}
    )
